package com.bawei.test.testtwo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    private TextView textView;
    private Button bt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        bt = (Button) findViewById(R.id.bt_jia);
        textView = (TextView) findViewById(R.id.tv_show);
        bt.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        Toast.makeText(this,"点击按钮了",Toast.LENGTH_SHORT).show();
    }
}
